#include <iostream>
#include <fstream>
#include <vector>
using std::ifstream;
using std::ofstream;
using std::endl;
//using std::vector;
main(int argc, char** argv)
{ 

ifstream input1(argv[1]); 

short a; 
 ofstream outfile;
 int i=0; 
  outfile.open(argv[2], std::ios::binary | std::ios::out);
while(input1>>a)
{ 
  outfile.write((char*)&a, sizeof(short)); // sizeof can take a type，which presents the volumn
  i++; 
}

std::cout<<i;
outfile.close();
} 
